//
//  ShouCangMoreVC.m
//  SnailPost
//
//  Created by Liuiu on 16/3/17.
//  Copyright © 2016年 抠泥ser. All rights reserved.
//

#import "ShouCangMoreVC.h"

@interface ShouCangMoreVC ()

@end

@implementation ShouCangMoreVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor blackColor];
    
    UIView *vc = [[UIView alloc]init];
    vc.backgroundColor =[UIColor darkGrayColor];
    [self.view addSubview:vc];
     [vc mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).with.offset(0);
        make.left.equalTo(self.view).with.offset(0);
        make.right.equalTo(self.view).with.offset(0);
        make.height.mas_equalTo(60);
    }];
    
    UIButton *button =[UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 7, 50, 50);
    [vc addSubview:button];
    [button setImage:[UIImage imageNamed:@"return"] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    
    
    UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 200,55)];
    name.text = _hm.title;
    name.font = [UIFont systemFontOfSize:19];
    name.textColor = [UIColor whiteColor];
    name.center = CGPointMake(self.view.frame.size.width / 2, 60 / 2);
    [vc addSubview:name];
    
    
    self.view.backgroundColor = [UIColor whiteColor];
    UIWebView *wv =[[UIWebView alloc]initWithFrame:CGRectMake(0, 60, self.view.frame.size.width, self.view.frame.size.height)];
    wv.scrollView.bounces = NO;
    wv.backgroundColor = [UIColor whiteColor];
    [wv goBack];
    [self.view addSubview:wv];
    
    //******** webView开启视频必须把全局断点去掉.
   
    
    
    //加载网址
    NSString *stg = _hm.mp4_url;
    
    
    [wv loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:stg]]];

}
- (void)back:(UIButton *)btn
{
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
